/* 
 * Copyright [2017] [Alex/LiBo(libo2dev.aliyun.com/alex.link@foxmail.com)]
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hyts.bmsp.record;

import java.util.List;
import java.util.Map;

import com.jfinal.plugin.activerecord.Record;

/**  
 * @Title AbstractSqlDao.java  
 * @Package com.hyts.bmsp.record  
 * @Description 抽象操作的sql语句操作方法数据访问对象 ,操作执行sql语句进行
 * 				复杂查询方法
 * @author LiBo/Alex  
 * @date 2017年12月27日  
 * @version V1.0  
 */
public abstract class AbstractQueryDao {
	  
	 /**  
	 * @Title: query  
	 * @Description: 根据sql查询-非常基本的操作方法  
	 * @param  sql
	 * @return List<Record> 返回类型  
	 * @throws  
	 */ 
	public abstract List<Record> query(String sql); 
	
	 /**  
	 * @Title: query  
	 * @Description: 根据sql查询-非常基本的操作方法  
	 * @param  sql 语句
	 * @param  params 参数集合对象
	 * @return List<Record>    返回类型  
	 * @throws  
	 */ 
	public abstract List<Record> query(String sql,Object... params);
	 
	/**  
	 * @Title: load  
	 * @Description: 根据sql查询 
	 * @param  sql 语句
	 * @return Record  返回类型  
	 * @throws  
	 */ 
	public abstract Record load(String sql);
	/**  
	 * @Title: loadById  
	 * @Description: 查询信息根据  id
	 * @param  sql 语句
	 * @param  id 关键字
	 * @return List<Record>    返回类型  
	 * @throws  
	 */ 
	public abstract <T>Record load(String sql,T id);
	
	/**  
	 * @Title: load  
	 * @Description: 查询信息根据 
	 * @param  sql
	 * @param  参数  集合
	 * @return Record    返回类型  
	 * @throws  
	 */ 
	public abstract Record load(String sql,Object... params);
	
	
}
